/*
 * @Author: FredWang
 * @Date:   2018-06-16 10:05:49
 * @Last Modified by:   FredWang
 * @Last Modified time: 2018-06-16 14:50:21
 */

$(function() {
    loadAnnou()
})

function loadAnnou() {
    let annouList = $('#annou-list')
    $.ajax({
        url: "/mock/home.json",
        type: "GET",
        datatype: "JSON",
        success: function(res) {
            let annouData = res.data.annouList
            $.each(annouData, function(key, value) {
                annouList.append(`<li class="annou-item"><a href="${value.url}">${value.title}</li>`)
            });
        },
        error: function() {
            alert("数据加载失败...");
        }
    });

}